#include<iostream>
using namespace std;
int n;
int main()
{
	cin >> n;
	int s = 1;
	int count = 1;
	while (s <= n * n) {
		int x;
		cin >> x;
		for (int i = 0; i < x; i++) {
			if (count % 2 == 0) {
				cout << 1;
			}
			else {
				cout << 0;
			}
			if (s % n == 0) {
				cout << endl;
			}
			s++;
		}
		count++;
	}
	return 0;
}